#!/bin/bash

cd /opt/jen-space

kubectl delete -f $1-dep.yaml
kubectl delete -f $1-svc.yaml
#这里速度太快会导致docker rmi删不掉，所以停留3秒钟
sleep 3
docker rmi 192.168.63.20:10080/library/$1:latest -f
ssh node1 -p 10022 "docker rmi 192.168.63.20:10080/library/$1:latest"
ssh node2 -p 10022 "docker rmi 192.168.63.20:10080/library/$1:latest"
ssh node3 -p 10022 "docker rmi 192.168.63.20:10080/library/$1:latest"


